{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[5, 13, 25, 18, 7, 15, 25]\n",
      "000000.yvhasuoxlg\n",
      "000001.egryotzhdm\n",
      "000002.yocwfmenbl\n",
      "000003.xnjfuaiedl\n",
      "000004.amxvfluphn\n",
      "000005.lyhdubvifp\n",
      "000006.xzkwvreija\n",
      "000007.wuthqefnca\n",
      "000008.cvjrelaiqt\n",
      "000009.sjilkbeopd\n",
      "000010.znoutqbfgk\n",
      "000011.ocljakvshe\n",
      "000012.nhpvlikoxy\n",
      "000013.aglkrsvpoz\n",
      "000014.ikhbnqsudz\n",
      "000015.mvshkbrglp\n",
      "000016.dsqjbtzaop\n",
      "000017.xogszuekcb\n",
      "000018.utrevswngz\n",
      "000019.barthouecd\n",
      "000020.uzeyvkminb\n",
      "000021.fchtxbsapw\n",
      "000022.tqxkfnilzo\n",
      "000023.daqpgjbrkc\n",
      "000024.tshclivwbz\n",
      "000025.bxunzsrmte\n",
      "000026.pyjsrmvzdu\n",
      "000027.qxwitclnbe\n",
      "000028.dlmspvtgry\n",
      "000029.wrouvkebtz\n",
      "000030.jmfydorlxt\n",
      "000031.wgbatfksud\n",
      "000032.gwrpueacqz\n",
      "000033.vbqgmudzfa\n",
      "000034.daigzrqpvk\n",
      "000035.yoehjugbln\n",
      "000036.wdfkpxcroa\n",
      "000037.zmwcsbhkjd\n",
      "000038.gcnbkhdsez\n",
      "000039.viktguapsn\n",
      "000040.oyhwdcfbpl\n",
      "000041.etvslohbxp\n",
      "000042.pruweoqlxi\n",
      "000043.bnotsafmgl\n",
      "000044.xcqnidswyr\n",
      "000045.xitzqomlnu\n",
      "000046.bfljhzpskr\n",
      "000047.khqxnauopd\n",
      "000048.ocpmukhxji\n",
      "000049.pbcmsuqjit\n",
      "000050.kxbunqiywg\n",
      "000051.xbwuftyqzl\n",
      "000052.petwfbiraq\n",
      "000053.cmjlutkdqv\n",
      "000054.gikhvfeaqn\n",
      "000055.sxvehgqdpy\n",
      "000056.urbetwmchz\n",
      "000057.fhyecuxsdn\n",
      "000058.epglxwcyrm\n",
      "000059.vydlsmkaph\n",
      "000060.afopzkjcgv\n",
      "000061.lcsbmvoikg\n",
      "000062.xvtnbkdmiw\n",
      "000063.tszhibkwyp\n",
      "000064.zptnolrjwd\n",
      "000065.hpvblcurws\n",
      "000066.vawziodejb\n",
      "000067.cmdqrweytk\n",
      "000068.xmirugopwz\n",
      "000069.rozcgepjwd\n",
      "000070.ocgijvhdmu\n",
      "000071.bgypudetlv\n",
      "000072.ojkiwqueax\n",
      "000073.wxumfkhlvz\n",
      "000074.feulgxkdjq\n",
      "000075.fwspendiar\n",
      "000076.vbduxkfisy\n",
      "000077.xvowyncdtk\n",
      "000078.mgkrvhyaop\n",
      "000079.zvomrpuntq\n",
      "000080.nlahditomw\n",
      "000081.levbxzasph\n",
      "000082.cnzqpvoxwy\n",
      "000083.uvexjytqih\n",
      "000084.ebcjhkwzvs\n",
      "000085.gyovzhltxj\n",
      "000086.nucerbavmy\n",
      "000087.gajdonywrp\n",
      "000088.egpsnbftku\n",
      "000089.egwfrsjdic\n",
      "000090.nuawcbvset\n",
      "000091.eoyihvatdc\n",
      "000092.ncwmodlgkr\n",
      "000093.xpdmbhgeco\n",
      "000094.wxcutnveqp\n",
      "000095.jkqlbygprc\n",
      "000096.kpnszxuglw\n",
      "000097.qxwyrvcojp\n",
      "000098.bnihfgmytc\n",
      "000099.mlgzxepsor\n",
      "000100.qytloerdha\n"
     ]
    }
   ],
   "source": [
    "\"\"\"\n",
    "1、给出三个整数，使用if语句判断大小，并升序输出\n",
    "2、有一个列表lst = [1, 4, 9, 16, 2, 5, 10, 15],生成一个新列表，要求新列表元素是lst相邻2项的和\n",
    "3、随机生产100个产品ID，ID格式如下：\n",
    "        *顺序的数字6位，分割符位点号，10个随机小写英文字符\n",
    "        *例如000005.xcbaaduixy\n",
    "\"\"\"\n",
    "\n",
    "#判断三个整数并顺序输出\n",
    "a, b, c = map(int, input('输入三个不重复的整数，使用空格隔开>>>').split())\n",
    "if a <= b and a <= c:\n",
    "  if b <= c:\n",
    "    print('a={} b={} c={}'.format(a, b, c))\n",
    "  else:\n",
    "    print('a={} c={} b={}'.format(a, c, b)) \n",
    "if b <= a and b <= c:\n",
    "  if a <= c:\n",
    "    print('b={} a={} c={}'.format(b, a, c))\n",
    "  else:\n",
    "    print('b={} c={} a={}'.format(b, c, a))\n",
    "if c <= a and c <= b:\n",
    "  if a <= b:\n",
    "    print('c={} a={} b={}'.format(c, a, b))\n",
    "  else:\n",
    "    print('c={} b={} a={}'.format(c, b, a))\n",
    "\n",
    "\n",
    "\n",
    "#列表相邻项相加 \n",
    "lst = [1, 4, 9, 16, 2, 5, 10, 15]\n",
    "lst_new = []\n",
    "index = 1\n",
    "for i in lst:\n",
    "    lst_new.append(i + lst[index])\n",
    "    index += 1\n",
    "    if index > 7:\n",
    "        break\n",
    "print(lst_new)\n",
    "\n",
    "# lst[0] + lst[1]\n",
    "# lst[1] + lst[2]\n",
    "# lst[2] + lst[3]\n",
    "# lst[3] + lst[4]\n",
    "# lst[5] + lst[6]\n",
    "# lst[6] + lst[7]\n",
    "\n",
    "\n",
    "\"\"\"\n",
    "随机生产100个产品ID，ID格式如下：\n",
    "        *顺序的数字6位，分割符位点号，10个随机小写英文字符\n",
    "        *例如000005.xcbaaduixy\n",
    "\"\"\"\n",
    "import random\n",
    "import string\n",
    "for i in range(101):\n",
    "  a = ('{:06d}'.format(i))\n",
    "  b = ''.join(random.choices(string.ascii_lowercase, k=10))\n",
    "  print('{}.{}'.format(a, b))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
